@using Xunit;
@inherits TestContext
@code
{
    [Fact]
    public void FluentSplitter_DefaultHorizontal()
    {
        // Arrange && Act
            var cut = Render(@<FluentSplitter Id="split-test" Orientation="Orientation.Horizontal">
            <Panel1>render me</Panel1>
            <Panel2>render me</Panel2>
            </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_DefaultVertical()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Orientation="Orientation.Vertical">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Size1()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Orientation="Orientation.Horizontal" Panel1Size="25%">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Size2()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Orientation="Orientation.Horizontal" Panel2Size="25%">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_SizeBoth()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Orientation="Orientation.Horizontal" Panel1Size="25%" Panel2Size="25%">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Collapsed()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_BarSize()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" BarSize="4">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_BarHandle()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" BarSize="4" BarHandle="false">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }
    
    [Fact]
    public void FluentSplitter_Panel1MinSizePercent()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" Panel1MinSize="15%">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Panel1MinSizeFraction()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" Panel1MinSize="0.20fr">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Panel1MinSizePixel()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" Panel1MinSize="55px">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
        </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Panel2MinSizePercent()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" Panel2MinSize="15%">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
    </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Panel2MinSizeFraction()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" Panel2MinSize="0.20fr">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
    </FluentSplitter>);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentSplitter_Panel2MinSizePixel()
    {
        // Arrange && Act
        var cut = Render(@<FluentSplitter Id="split-test" Collapsed="true" Panel2MinSize="55px">
        <Panel1>render me</Panel1>
        <Panel2>render me</Panel2>
    </FluentSplitter>);

        // Assert
        cut.Verify();
    }
}